/**
 * @file       global_thread_pool.hpp
 * @author     WMQ
 * @date       2025/1/5
 * @brief      thread_pool的一个单例
 */

#include "thread_pool.hpp"

class GlobalThreadPool
{
public:
    static ThreadPool &GetInstance()
    {
        static ThreadPool thread_pool(1024 * 1024, std::thread::hardware_concurrency() * 2);
        return thread_pool;
    }

    GlobalThreadPool(const GlobalThreadPool &) = delete;
    GlobalThreadPool &operator=(const GlobalThreadPool &) = delete;

private:
    GlobalThreadPool() {}

    ~GlobalThreadPool() {}
};